package com.jzhao.gper.command;

import java.util.ArrayList;
import java.util.List;

public class FtpController {
    private List<ICommand> commandList = new ArrayList<ICommand>();

    public void addCommand(ICommand command){
        this.commandList.add(command);
    }

    public void excute(ICommand command){
        command.excute();
    }

    public void excutes(){
        for (ICommand command:
             commandList) {
            command.excute();
        }
        commandList.clear();
    }
}
